﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using pos.excption;
using System.Collections;
using Spring.Data.NHibernate.Support;
using Spring.Data.NHibernate;
using NHibernate;
using NHibernate.Criterion;

namespace pos.entity
{
    class PaySettle : IHibernateCallback
    {

         private Hashtable m_list;
         public PaySettle(Hashtable list)
         {
             m_list = list;
         }
         public object DoInHibernate(ISession session)
        {

            long lseq = (DateTime.Now-new DateTime(2010,1,1)).Ticks/10000000; 
            foreach (System.Collections.DictionaryEntry item in m_list)
            {
                t_sale p = (t_sale)item.Value;
             //   sequence s = new sequence(t_sale.SEQN0);
            //    p.seqID = s.getNumberSequence();
            //    if (lseq < 0)
              //      lseq = p.seqID;
                p.moneySeqID = lseq;
                p.add();
              //  s.UpdateSequence();


            }

          
        

            return true;
        }


    }
}
